package demo3;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Component;

@Component
public class Person {
    @Autowired
    @Qualifier("summer")
    private Clothes clothes;
    //private Sweater sweater;
    //private Shirt shirt;
    public void play() {
        //Shirt shirt = new Shirt();
        //shirt.wear();
        //sweater.wear();
        clothes.wear();
        System.out.println("出去玩!");
    }
}
